from school.models import Teacher,Banji,Student
# Create your views here.


print(Student.objects.all())
print(Banji.objects.filter(name__contains='OL'))
# print(Banji.objects.get(cid=1).cid.all())
print(Student.objects.filter(banji_id=1))
# print(Banji.objects.filter(cid=2).student_set.all())
# print(Banji.objects.get(cid=2).student_set.all())

print(Student.objects.get(id=3).banji)
print(Banji.objects.filter(student__id=2))


print(Teacher.objects.get(id=1).banji.all())
print(Banji.objects.filter(teacher__id=2))